<?php
/* -----------------------------------------------------------------
 *                          Aveghe Installer
 * -----------------------------------------------------------------
 * Aveghe Installer: made your web application installation easy!
 * Copyright (C) 2008 Elia Contini
 * 
 * Aveghe Installer is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * Aveghe Installer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 */

set_include_path(get_include_path().PATH_SEPARATOR.'../lib');
require_once('Zend/Loader.php');

Zend_Loader::registerAutoload();

$avegheNS = new Zend_Session_Namespace('avegheNS');

$fileContent = '';

if( isset($avegheNS->fileContent) )
	{
		$fileContent = $avegheNS->fileContent;
		
		$output = fopen('php://output', 'w');
		
		header('Content-Type: text/plain');
		header('Content-Disposition: attachment; filename="conf.php"');
		
		fputs($output, $fileContent);
		
		fclose($output);
	}
?>